{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import json\n",
    "from keras.models import Model\n",
    "from keras.layers import Input\n",
    "from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, BatchNormalization, Concatenate\n",
    "from keras import backend as K\n",
    "from collections import OrderedDict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def format_decimal(arr, places=6):\n",
    "    return [round(x * 10**places) / 10**places for x in arr]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "DATA = OrderedDict()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### graph 6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "random_seed = 10006\n",
    "data_in_shape = (8, 8, 2)\n",
    "\n",
    "input_layer_0 = Input(shape=data_in_shape)\n",
    "branch_0 = Conv2D(4, (3,3), activation='relu', padding='same', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_0_0')(input_layer_0)\n",
    "\n",
    "input_layer_1 = Input(shape=data_in_shape)\n",
    "branch_1 = Conv2D(2, (1,1), activation='relu', padding='valid', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_1_0')(input_layer_1)\n",
    "branch_1 = Conv2D(4, (3,3), activation='relu', padding='same', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_1_1')(branch_1)\n",
    "branch_1 = Conv2D(2, (1,1), activation='relu', padding='valid', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_1_2')(branch_1)\n",
    "\n",
    "input_layer_2 = Input(shape=data_in_shape)\n",
    "branch_2 = Conv2D(5, (3,3), activation='relu', padding='same', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_2_0')(input_layer_2)\n",
    "branch_2 = Conv2D(3, (3,3), activation='relu', padding='same', strides=(1,1), data_format='channels_last', use_bias=True,\n",
    "                         name='conv_2_1')(branch_2)\n",
    "\n",
    "output_layer = Concatenate()([branch_0, branch_1, branch_2])\n",
    "model = Model(inputs=[input_layer_0, input_layer_1, input_layer_2], outputs=output_layer)\n",
    "\n",
    "data_in = []\n",
    "for i in range(3):\n",
    "    np.random.seed(random_seed + i)\n",
    "    data_in.append(np.expand_dims(2 * np.random.random(data_in_shape) - 1, axis=0))\n",
    "\n",
    "# set weights to random (use seed for reproducibility)\n",
    "weights = []\n",
    "for i, w in enumerate(model.get_weights()):\n",
    "    np.random.seed(random_seed + i)\n",
    "    weights.append(2 * np.random.random(w.shape) - 1)\n",
    "model.set_weights(weights)\n",
    "\n",
    "result = model.predict(data_in)\n",
    "data_out_shape = result[0].shape\n",
    "data_in_formatted = [format_decimal(data_in[i].ravel().tolist()) for i in range(3)]\n",
    "data_out_formatted = format_decimal(result[0].ravel().tolist())\n",
    "\n",
    "DATA['graph_06'] = {\n",
    "    'inputs': [{'data': data_in_formatted[i], 'shape': data_in_shape} for i in range(3)],\n",
    "    'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in weights],\n",
    "    'expected': {'data': data_out_formatted, 'shape': data_out_shape}\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['input_2', 'conv_1_0', 'input_3', 'input_1', 'conv_1_1', 'conv_2_0', 'conv_0_0', 'conv_1_2', 'conv_2_1', 'concatenate_1']\n"
     ]
    }
   ],
   "source": [
    "import json\n",
    "config = json.loads(model.to_json())\n",
    "print([x['config']['name'] for x in config['config']['layers']])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### export for Keras.js tests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "filename = '../../test/data/graph/06.json'\n",
    "if not os.path.exists(os.path.dirname(filename)):\n",
    "    os.makedirs(os.path.dirname(filename))\n",
    "with open(filename, 'w') as f:\n",
    "    json.dump(DATA, f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\"graph_06\": {\"inputs\": [{\"data\": [0.87859, 0.511819, -0.499979, 0.899103, -0.273074, -0.448988, 0.778226, -0.725762, 0.533488, -0.254761, 0.563277, 0.149018, -0.800132, -0.323823, -0.687353, -0.853655, 0.344338, -0.804382, -0.339254, -0.814494, -0.931578, -0.554643, 0.526105, 0.197187, -0.423878, -0.86257, -0.805159, 0.875224, -0.45214, -0.480211, -0.152902, 0.569441, -0.211393, -0.317172, -0.578325, 0.08373, -0.290923, -0.917902, -0.79171, -0.507596, -0.688969, 0.13645, -0.227688, -0.984034, -0.12649, 0.788219, 0.613676, 0.486748, 0.810045, 0.79828, 0.258775, -0.365513, 0.780025, -0.883853, 0.036758, -0.106986, 0.678987, -0.117617, 0.719819, -0.904588, -0.003723, 0.744139, 0.344811, -0.832108, -0.69998, 0.185014, 0.256453, -0.047385, -0.870467, -0.492493, 0.739994, 0.674833, 0.475455, -0.095844, -0.920258, 0.895529, 0.933401, 0.086867, -0.084179, 0.058479, -0.698595, 0.109934, -0.497638, -0.759723, 0.184804, -0.097758, -0.482257, 0.052997, -0.120057, -0.599685, -0.324373, -0.776589, 0.197334, -0.039466, 0.911675, -0.34869, 0.506552, 0.716607, 0.930851, -0.101359, 0.28458, 0.811404, 0.177922, 0.483056, 0.348253, -0.838838, 0.761488, -0.285614, 0.177429, -0.170556, 0.726269, -0.285743, 0.532491, -0.26225, 0.773676, 0.539706, 0.911474, 0.962223, 0.343429, 0.446745, 0.643217, -0.443733, -0.897673, -0.237513, 0.051002, 0.698658, -0.294338, -0.358399], \"shape\": [8, 8, 2]}, {\"data\": [-0.719503, 0.396686, 0.710021, -0.058892, -0.78922, -0.74094, -0.421022, -0.808307, 0.800549, -0.334559, -0.186061, 0.852542, -0.759177, -0.565928, -0.439353, -0.566006, 0.739029, 0.513581, -0.267873, 0.743929, -0.767563, -0.052566, -0.04449, 0.68184, 0.572289, 0.515837, -0.674829, -0.345664, 0.702239, -0.638317, -0.083214, -0.666578, 0.712641, -0.391794, 0.056017, -0.858674, -0.008642, -0.159135, -0.00677, 0.331901, -0.257608, -0.824415, 0.571256, 0.741805, -0.75251, 0.468774, -0.784013, 0.681435, -0.23194, 0.101493, -0.128162, -0.603826, -0.49174, -0.065357, -0.32479, 0.631058, 0.083835, -0.769532, -0.682364, 0.882268, -0.833573, -0.460043, 0.514984, 0.945882, -0.716884, -0.795482, 0.426371, -0.988366, 0.643317, 0.599972, -0.313279, -0.44164, 0.582645, -0.149293, 0.678646, -0.010416, -0.170983, 0.657191, 0.654839, -0.66861, -0.486733, 0.566186, 0.50032, -0.631832, -0.587607, 0.569767, 0.635765, 0.819135, 0.441633, -0.561978, -0.62083, 0.874285, -0.688123, 0.574826, -0.362262, 0.073101, -0.519688, -0.102416, -0.402484, 0.690901, -0.55265, -0.364623, -0.226078, 0.313158, 0.300124, 0.973938, -0.711208, -0.058027, 0.753508, -0.049087, 0.451992, -0.073969, 0.672509, 0.3412, -0.688499, 0.775659, 0.181513, 0.12763, 0.433325, 0.425375, -0.140093, 0.739271, -0.666047, -0.676331, -0.081829, 0.245534, 0.139074, -0.414734], \"shape\": [8, 8, 2]}, {\"data\": [0.839584, -0.988988, -0.527734, -0.797693, -0.884905, -0.146869, -0.267342, 0.449944, -0.282828, -0.728855, -0.587547, -0.355267, -0.669017, 0.196118, 0.567189, 0.859179, 0.975979, -0.814016, 0.903094, -0.21355, -0.109601, -0.768741, 0.27166, 0.030371, -0.275986, -0.819553, 0.554826, -0.864389, 0.096677, 0.957206, 0.754441, 0.330801, 0.5741, 0.36419, 0.987371, -0.530545, 0.591249, -0.273263, 0.897734, -0.304084, 0.940353, 0.135187, -0.058766, -0.038047, -0.415426, -0.621638, -0.92997, -0.631599, 0.03693, 0.434788, 0.436622, -0.591559, -0.857843, 0.426905, -0.663415, 0.457006, 0.764796, -0.413896, -0.71939, -0.479789, -0.317247, -0.016311, 0.148157, 0.362594, -0.908516, -0.776948, 0.518685, 0.231957, -0.205797, 0.925386, -0.2551, -0.131588, -0.287732, 0.194838, -0.478042, 0.006402, 0.49051, -0.218892, -0.082877, -0.598026, 0.878144, 0.797895, 0.578246, 0.222223, -0.143421, 0.189322, 0.283295, -0.602854, 0.74498, 0.850133, -0.421519, 0.816516, 0.098714, 0.595811, 0.926334, -0.1268, -0.84326, 0.723379, -0.824281, -0.992293, -0.526419, -0.331198, -0.447634, -0.964083, -0.638283, 0.186446, 0.388669, 0.704854, -0.214886, -0.50761, 0.961234, 0.373414, 0.216379, 0.391879, -0.856657, -0.65227, 0.838337, 0.61763, -0.7879, -0.437836, 0.517913, -0.217903, -0.300952, 0.023804, -0.861553, -0.649055, 0.42497, 0.183235], \"shape\": [8, 8, 2]}], \"weights\": [{\"data\": [0.87859, 0.511819, -0.499979, 0.899103], \"shape\": [1, 1, 2, 2]}, {\"data\": [-0.719503, 0.396686], \"shape\": [2]}, {\"data\": [0.839584, -0.988988, -0.527734, -0.797693, -0.884905, -0.146869, -0.267342, 0.449944, -0.282828, -0.728855, -0.587547, -0.355267, -0.669017, 0.196118, 0.567189, 0.859179, 0.975979, -0.814016, 0.903094, -0.21355, -0.109601, -0.768741, 0.27166, 0.030371, -0.275986, -0.819553, 0.554826, -0.864389, 0.096677, 0.957206, 0.754441, 0.330801, 0.5741, 0.36419, 0.987371, -0.530545, 0.591249, -0.273263, 0.897734, -0.304084, 0.940353, 0.135187, -0.058766, -0.038047, -0.415426, -0.621638, -0.92997, -0.631599, 0.03693, 0.434788, 0.436622, -0.591559, -0.857843, 0.426905, -0.663415, 0.457006, 0.764796, -0.413896, -0.71939, -0.479789, -0.317247, -0.016311, 0.148157, 0.362594, -0.908516, -0.776948, 0.518685, 0.231957, -0.205797, 0.925386, -0.2551, -0.131588], \"shape\": [3, 3, 2, 4]}, {\"data\": [-0.677523, 0.027961, 0.394704, -0.409564], \"shape\": [4]}, {\"data\": [-0.890769, -0.844694, -0.920267, -0.682613, -0.568139, 0.312587, 0.736227, 0.635122, -0.856365, 0.218101, 0.041542, -0.384862, 0.048264, 0.923443, -0.265832, -0.458856, 0.219075, -0.612605, -0.509106, 0.791957, 0.529097, -0.120279, 0.542244, -0.508643, 0.726323, 0.438948, -0.494463, 0.474704, 0.252505, -0.292884, -0.165492, -0.138496, -0.810012, -0.948138, -0.301889, 0.670699, -0.121034, -0.450804, -0.144644, -0.965637, -0.543901, 0.230967, -0.084891, -0.929582, -0.404243, -0.24272, -0.343071, -0.435454, 0.197365, 0.754672, -0.752234, 0.074508, 0.443156, 0.774464, -0.146322, 0.981814, 0.082137, -0.539318, -0.357061, -0.039096, -0.835386, 0.343683, -0.673521, 0.711241, -0.537309, -0.781081, -0.157568, 0.895515, 0.059398, -0.544656, -0.895981, 0.399288, 0.806693, 0.020184, 0.17301, -0.850884, -0.064934, -0.152159, 0.731961, 0.808576, 0.379968, 0.38924, 0.372263, 0.326642, -0.937738, 0.826903, 0.848141, -0.117183, -0.858689, 0.099044], \"shape\": [3, 3, 2, 5]}, {\"data\": [0.112538, -0.288508, 0.401783, 0.811569, -0.995511], \"shape\": [5]}, {\"data\": [-0.050965, -0.087285, -0.473172, 0.867282, -0.743491, -0.241133, 0.709355, 0.896415, -0.969831, -0.447527, -0.516219, 0.975673, 0.407348, -0.144189, 0.600741, 0.763511, -0.329705, -0.314215, 0.182119, 0.992097, -0.685071, 2.4e-05, 0.120192, -0.823655, 0.684029, -0.600524, -0.43948, -0.616136, -0.599666, -0.235218, 0.17687, 0.467829, -0.768591, 0.281012, -0.925197, 0.016008, -0.962944, 0.259113, 0.361207, 0.110518, -0.254318, -0.458729, -0.534848, 0.059413, 0.832174, -0.937601, -0.104627, -0.744602, 0.581276, -0.971709, -0.610956, -0.080696, 0.707538, -0.919302, 0.366984, -0.047713, -0.309375, 0.848002, 0.71513, 0.613549, -0.679252, 0.510242, -0.852482, -0.939415, -0.416649, 0.093362, -0.332654, 0.184941, -0.221513, 0.925754, -0.43892, -0.480151], \"shape\": [3, 3, 2, 4]}, {\"data\": [0.314304, 0.087114, -0.192081, 0.687827], \"shape\": [4]}, {\"data\": [0.488004, 0.911709, 0.385817, 0.735948, 0.007869, -0.35278, 0.875938, -0.016655], \"shape\": [1, 1, 4, 2]}, {\"data\": [0.263717, -0.720003], \"shape\": [2]}, {\"data\": [-0.296519, 0.572188, -0.272211, -0.907259, -0.996198, 0.61739, 0.110548, 0.580901, -0.115354, 0.574469, -0.03939, 0.348826, -0.042372, 0.132598, -0.620505, 0.302978, -0.907868, 0.723517, -0.666202, -0.655146, -0.169661, -0.721866, 0.65103, -0.379465, 0.187194, 0.910984, -0.046393, -0.717226, -0.220449, -0.812018, 0.758602, -0.425723, 0.826973, 0.41357, -0.982014, 0.308827, 0.930297, 0.552791, 0.422404, -0.45334, 0.271448, 0.563136, -0.316318, 0.641678, 0.363059, -0.440587, -0.037204, -0.119982, 0.826628, -0.369548, 0.06503, 0.559157, 0.855733, 0.156159, 0.690997, 0.38689, 0.197399, -0.520678, -0.60102, -0.519463, 0.437547, -0.963725, 0.840374, -0.961812, 0.682657, 0.683939, 0.6797, 0.823475, -0.155763, 0.407472, 0.890151, -0.275848, -0.321692, -0.669862, 0.847674, 0.467442, -0.767249, -0.762515, 0.856726, -0.318873, 0.694542, 0.714746, -0.143808, -0.049621, -0.475187, -0.353159, 0.74349, 0.257662, -0.882949, -0.242672, -0.152523, -0.014676, 0.055601, 0.544025, -0.020051, -0.797163, -0.304542, 0.614325, -0.53998, 0.375662, -0.705527, -0.520286, -0.7861, -0.567627, -0.367321, 0.327227, 0.283708, 0.457965, 0.984347, -0.337644, -0.675635, -0.201958, -0.396271, 0.353544, 0.598736, -0.595224, 0.687218, 0.23673, 0.212353, 0.278087, 0.918215, -0.460093, 0.023297, -0.691769, -0.754752, -0.38847, 0.136175, 0.73544, -0.589597, -0.838913, 0.145886, 0.840253, -0.86358, 0.11517, -0.739268], \"shape\": [3, 3, 5, 3]}, {\"data\": [-0.983721, 0.040472, -0.976147], \"shape\": [3]}], \"expected\": {\"data\": [0.783158, 0.0, 0.755585, 1.354532, 0.388238, 0.0, 0.658278, 0.0, 2.768527, 0.622901, 0.0, 0.992188, 1.457013, 0.899461, 0.0, 0.313867, 0.0, 0.0, 0.0, 0.543387, 0.0, 1.967485, 1.145486, 0.739265, 0.0, 0.0, 1.513981, 0.0, 1.505243, 0.0, 1.374629, 0.566702, 0.0, 3.153728, 0.0, 0.0, 2.401856, 0.0, 0.0, 0.0, 0.263717, 0.0, 6.780407, 0.0, 0.0, 0.0, 1.176105, 0.0, 0.0, 0.499746, 0.0, 0.678625, 0.0, 2.176741, 1.556323, 0.382976, 1.367051, 0.851911, 0.641611, 0.0, 4.443375, 0.0, 0.0, 0.369416, 1.271133, 0.0, 0.35462, 0.343751, 0.0, 3.225659, 3.615087, 0.0, 0.0, 0.267301, 0.0, 1.223273, 0.271892, 0.0, 0.0, 2.956975, 0.851185, 2.77537, 0.0, 0.759606, 1.865522, 1.373855, 0.0, 2.940415, 2.855301, 1.219689, 2.409489, 0.0, 2.417252, 2.280766, 0.585974, 0.0, 0.92853, 3.526304, 5.486432, 0.0, 1.958121, 0.0, 1.82002, 0.267015, 0.0, 3.320134, 6.649286, 4.458298, 1.850355, 0.0, 0.0, 0.408303, 0.91157, 0.0, 6.815333, 2.481697, 6.209379, 0.50833, 1.762187, 1.218899, 1.762522, 1.966569, 0.0, 5.673741, 0.0, 4.752705, 0.189053, 2.113832, 0.0, 0.0, 1.186179, 0.031582, 1.408992, 3.731187, 0.0, 0.426282, 1.321851, 0.650194, 0.0, 0.34437, 0.0, 1.051753, 0.0, 3.459756, 0.187488, 0.980798, 0.0, 0.579226, 0.835763, 0.0, 3.573257, 7.013169, 0.0, 2.373435, 0.0, 0.0, 0.46052, 1.297171, 0.0, 2.515458, 4.860992, 4.192523, 2.006011, 1.69125, 1.394808, 0.674543, 0.263717, 0.0, 0.0, 0.957504, 4.649482, 2.444913, 0.381842, 0.0, 0.15934, 0.87115, 0.0, 0.958738, 0.0, 2.951608, 0.0, 1.832572, 1.209366, 0.799297, 1.238546, 0.039569, 0.0, 0.459377, 0.0, 4.390157, 0.375715, 0.867836, 0.042388, 0.273716, 0.0, 0.737157, 4.09905, 1.545676, 0.0, 0.0, 0.0, 0.0, 1.21666, 0.996993, 4.345477, 0.0, 6.197869, 0.55794, 0.0, 1.136587, 1.61917, 0.283281, 0.0, 2.681405, 0.0, 0.0, 0.0, 0.548541, 0.0, 0.0, 0.271393, 0.0, 0.130439, 0.926103, 0.0, 1.32384, 0.461043, 0.182597, 1.05483, 0.682446, 0.054049, 2.84936, 0.0, 4.025506, 1.609502, 0.131638, 0.0, 0.0, 0.266173, 0.0, 1.388594, 0.0, 0.0, 0.855487, 2.724818, 0.0, 0.0, 1.187502, 0.0, 3.968753, 4.71496, 0.0, 1.960545, 1.078124, 0.0, 0.0, 0.26603, 0.0, 3.513218, 3.662898, 2.330637, 0.51949, 0.0, 0.0, 0.0, 1.384665, 0.0, 2.234282, 0.0, 1.418436, 0.279507, 1.641786, 1.111902, 0.629095, 0.792799, 0.0, 4.373085, 0.0, 2.842434, 0.01565, 0.0, 0.0, 2.333011, 0.462746, 0.0, 0.895657, 5.246755, 0.0, 0.79123, 0.0, 0.360451, 2.446061, 0.45122, 0.0, 5.643153, 0.0, 4.589634, 0.0, 0.508272, 1.016975, 4.953526, 0.264514, 0.0, 3.499936, 3.787676, 3.461426, 0.609638, 0.0, 0.0, 0.255346, 0.412947, 0.0, 8.829485, 3.830415, 0.0, 0.0, 0.0, 0.0, 1.69848, 1.829299, 0.0, 3.753009, 1.072297, 6.044919, 1.384408, 0.0, 0.222194, 2.629938, 0.292971, 0.0, 1.887579, 4.934102, 2.090506, 0.0, 0.0, 0.0, 0.927803, 0.474217, 0.0, 2.169687, 3.164848, 3.341285, 0.0, 1.577633, 0.0, 3.612573, 0.673433, 0.0, 6.064723, 5.554905, 1.453295, 0.0, 0.0, 0.177991, 1.396289, 2.068344, 0.0, 5.643857, 6.042552, 0.0, 0.0, 1.854158, 0.839306, 0.835104, 0.436173, 0.0, 3.709983, 0.422919, 0.580141, 1.294743, 0.697389, 0.570422, 0.730697, 0.269908, 0.0, 0.0, 0.423737, 0.0, 0.156835, 1.287707, 0.0, 0.0, 0.263717, 0.0, 8.156083, 0.0, 4.274837, 0.624175, 0.0, 0.554373, 1.618086, 0.59725, 0.0, 0.0, 0.0, 5.984191, 0.0, 0.0, 0.848779, 2.729617, 1.184217, 0.0, 0.0, 0.0, 1.332818, 1.974139, 0.716839, 0.856581, 2.260274, 0.766143, 0.0, 3.770693, 0.0, 2.610046, 0.0, 0.0, 0.0, 2.179732, 1.299897, 0.0, 2.436671, 8.87575, 0.0, 0.053185, 0.525021, 0.0, 2.081596, 1.076986, 0.0, 1.770626, 5.173126, 0.0, 0.0, 1.425916, 0.0, 0.897303, 0.347736, 0.0, 3.228194, 0.0, 0.0, 0.0, 0.898005, 0.0, 0.0, 0.717892, 0.0, 4.999607, 0.0, 4.346276, 0.516299, 0.078794, 0.0, 0.0, 0.957705, 0.0, 4.238865, 0.0, 2.295107, 0.268057, 0.0, 0.0, 1.614604, 0.849641, 0.0, 5.168521, 0.0, 4.787264, 1.796136, 0.0, 0.0, 1.057544, 1.101163, 0.0, 1.109945, 0.469592, 1.343999, 1.293408, 0.196045, 0.0, 0.0, 1.577616, 0.242832, 3.895682, 0.0, 0.0, 0.0, 0.614993, 0.0, 0.277922, 0.346237, 0.0, 0.0, 0.412801, 3.772814, 0.106452, 0.0, 0.0, 1.35644, 0.975754, 0.0, 1.263973, 0.611796, 0.495149, 0.0, 0.0, 0.0, 2.359814, 0.270704, 0.0, 2.333852, 0.0, 0.898532, 0.0, 0.0, 0.0, 1.173298, 0.550346, 0.0, 2.771913, 2.49575, 5.763396, 0.0, 0.0, 0.0, 1.664586, 0.267666, 0.0, 1.13131, 6.185585, 0.721207, 0.0, 0.0, 0.0, 3.552873, 0.275799, 0.0, 2.440077, 5.274109, 1.023695, 0.0, 0.069861, 0.0, 2.047365, 1.599599, 0.0, 2.426174, 7.328721, 0.0, 2.316869, 0.0, 0.0, 0.0, 0.458296, 0.0, 6.460921, 0.0, 2.157512, 0.0, 1.067858, 0.0, 2.860377, 0.28059, 0.0, 2.31152, 0.0, 3.806666, 0.0, 0.0, 0.0, 1.430358, 0.982119, 0.0, 0.0, 7.743476, 0.0], \"shape\": [8, 8, 9]}}}\n"
     ]
    }
   ],
   "source": [
    "print(json.dumps(DATA))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
